<?php
namespace Home\Model;
use Think\Model;

class UsersAdditionalModel extends BaseModel {

	protected $tableName = 'tp_users_additional';

	/**
	 * @desc: 校验审核信息提交的唯一性
	 * @Author: delayhsiao
	 * @update: 2016-11-24
	 **/
	public function checkVerifyRepeat($uid){
		$repeat = $this->where(array('f_user_id'=>$uid))->count();
		if($repeat > 0){
			return false;
		}else{
			return true;
		}
	}
        
        /**
	 * @desc: 根据用户id修改审核状态为通过
         * @param type $uid 用户id
	 * @Author: cheng
	 **/
	public function saveStatus($uid){
            $result = $this->where(['f_user_id'=>$uid])->save(['f_addition_status' => 1, 'f_addition_time' => date('YmdHis')]); //审核通过
            return $result;
	}

}